//
//  FKHotBuinessCell.m
//  WanTao
//
//  Created by 刘文超 on 2019/8/26.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKHotBuinessCell.h"
#import "FKHomeGoods.h"

@interface FKHotBuinessCell()
@property (nonatomic, weak) UIImageView *pictureView;
@end
@implementation FKHotBuinessCell

- (void)setupSubviews
{
    [super setupSubviews];
    self.backgroundColor = [UIColor whiteColor];
    
    UIImageView *pictureView = [[UIImageView alloc] init];
    [self.contentView addSubview:pictureView];
    self.pictureView = pictureView;
    pictureView.contentMode = UIViewContentModeScaleAspectFit;
    [pictureView fk_viewCornerRadius:5 borderWidth:0 borderColor:nil];
    
    [pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(fk_adjustW(5));
        make.right.offset(-fk_adjustW(5));
        make.top.offset(fk_adjustW(5));
        make.bottom.offset(-fk_adjustW(5));
    }];
    
   
}

- (void)setData:(id)data
{
    [super setData:data];
    
    if ([data isKindOfClass:[FKHomeGoods class]]) {
        FKHomeGoods *model = data;
    [self.pictureView sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:kPlaceholder_1x1];

    }
    
}

@end
